﻿using System;
using System.Collections.Generic;

using System.Text;
using HZ.Supervise.Model;
using System.Data;

namespace HZ.Supervise.IBLL
{
    public interface IBLL_Area
    {
        /// <summary>
        /// 根据地区编号获取地区信息
        /// </summary>
        /// <param name="AreaID">地区编号</param>
        /// <returns>区域信息</returns>
        Area GetArea(string AreaID);
        /// <summary>
        /// 获取下一级地区列表
        /// </summary>
        /// <param name="areaid"></param>
        /// <returns></returns>
        IList<Area> GetSonAreas(string areaid,int currentPage, int pagesize, out int totalRecord);

        /// <summary>
        /// 根据地区编号获取地区名称
        /// </summary>
        /// <param name="areaid">(多个,隔开)</param>
        /// <returns></returns>
        string GetAreaNamesByID(string areaid);

        /// <summary>
        /// 获取地区字符串中的地区列表
        /// </summary>
        /// <param name="Areaid"></param>
        /// <returns></returns>
        IList<Area> GetAreasByAreaID(string Areaid);
        /// <summary>
        /// 获取下一级地区列表
        /// </summary>
        /// <param name="areaid"></param>
        /// <returns></returns>
        IList<Area> GetSonAreas(string areaid);
        /// <summary>
        /// 获取区域之星
        /// </summary>
        /// <param name="newsqlwhere"></param>
        /// <param name="oldsqlwhere"></param>
        /// <param name="orderwhere"></param>
        /// <returns></returns>
        DataSet GetProcureAreaMax(string newsqlwhere, string oldsqlwhere, string orderwhere,string sqlArea);

        /// <summary>
        /// 生成树形菜单所需的数据
        /// 董辉
        /// 2011-4-24 23:50
        /// </summary>
        /// <returns></returns>
        string GetJSON(string areaid);
        /// <summary>
        /// 曹鹏
        /// 2011-4-27 8:55:44
        /// 根据地区县的名称得到该地区的去名称（某某市某某县）
        /// </summary>
        string GetCityNameByCountryName(string contryName);
		/// <summary>
		/// 曹鹏
		/// 2011年5月17日9:10:51
		/// 地区排名（县区）
		/// </summary>
		/// <param name="orderOfRank">排名的条件</param>
		/// <param name="orderBy">返回时排序条件</param>
		/// <param name="wherePm">本月查询条件</param>
		/// <param name="wherePms">上月的查询条件</param>
		/// <param name="currentpage">当前页</param>
		/// <param name="pagesize">每页数据条数</param>
		/// <param name="totalrecord">总页数</param>
		/// <returns>数据源</returns>
		DataTable GetProcureAreaMax1(string orderOfRank, string orderBy, string wherePm, string wherePms, string sortSource, int currentpage, int pagesize, out int totalrecord);
		/// <summary>
		/// 曹鹏
		/// 2011年5月24日17:35:26
		/// 取得该地区下面的子地区，如果该地区没有子地区，那么就显示它本身
		/// </summary>
		/// <param name="areaid"></param>
		/// <param name="currentPage"></param>
		/// <param name="pagesize"></param>
		/// <param name="totalRecord"></param>
		/// <returns></returns>
		IList<Area> GetAreas(bool flag,string areaid, int currentPage, int pagesize, out int totalRecord);
		/// <summary>
		/// 曹鹏
		/// 2011年5月17日9:10:51
		/// 地区排名（市）
		/// </summary>
		/// <param name="orderOfRank">排名的条件</param>
		/// <param name="orderBy">返回时排序条件</param>
		/// <param name="wherePm">本月查询条件</param>
		/// <param name="wherePms">上月的查询条件</param>
		/// <param name="currentpage">当前页</param>
		/// <param name="pagesize">每页数据条数</param>
		/// <param name="totalrecord">总页数</param>
		/// <returns>数据源</returns>
		DataTable GetProcureAreaMax2(string strgroupBy,string orderOfRank, string orderBy, string wherePm, string wherePms, string sortSource, int currentpage, int pagesize, out int totalrecord);
    }
}
